package edu.cmu.arch.pipesandfilters.frame;

import java.util.HashMap;
import java.util.Map;

public class Frame {

	private Map<Variable, Number> variableValueMap = new HashMap<Variable, Number>();
	/**
	 * Get values from the frame using the variable identifier
	 * For example, Long long = frame.getValue(Variable.Time);
	 * @param variable
	 * @return
	 */
	public Number getValue(Variable variable) {
		Number value = variableValueMap.get(variable);
		return value;
	}
	/**
	 * Puts a value into the frame (replaces one for the variable identifier
	 * if it is already there).
	 * For example, frame.putValue(Variable.Altitude, 30000.0D);
	 * @param variable
	 * @param value
	 */
	public void putValue(Variable variable, Number value) {
		variableValueMap.put(variable, value); 
	}
}
